package com.bsoft.gol.hcs.clinical.bean.req;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

/**
 * @author tongtp
 * @version v0.1
 * @className PrescriptionInformationRequest
 * @description 处方信息入参
 * @create 2019-06-19 13:50
 **/
@XmlRootElement(name = "RecipeList")
public class HisPrescriptionInformationRequest implements Serializable {
    private String visitOrganization;
    private String recipeOrganization;
    private String roamOrganization;
    private String pharmacyId;
    private String drugType;
    private String prescriptionRecordId;
    private String onlinePrescriptionRecordId;
    private Integer piecesChineseMedicineAgentNumb;
    private Integer boilSign;
    private Integer operationType;
    private String epitaxialSign;
    private String recipeNumber;
    private String invoiceCode;
    private String prescriptionDept;
    private String prescriptionDoctor;
    private String prescriptionDate;

    private List<PrescriptionDrug> PrescriptionDrugs;


    @XmlElement(name = "RecipeOrganization")
    public String getRecipeOrganization() {
        return recipeOrganization;
    }

    public void setRecipeOrganization(String recipeOrganization) {
        this.recipeOrganization = recipeOrganization;
    }

    @XmlElement(name = "RoamOrganization")
    public String getRoamOrganization() {
        return roamOrganization;
    }

    public void setRoamOrganization(String roamOrganization) {
        this.roamOrganization = roamOrganization;
    }

    @XmlElement(name = "OnlinePrescriptionRecordId")
    public String getOnlinePrescriptionRecordId() {
        return onlinePrescriptionRecordId;
    }

    public void setOnlinePrescriptionRecordId(String onlinePrescriptionRecordId) {
        this.onlinePrescriptionRecordId = onlinePrescriptionRecordId;
    }

    @XmlElement(name = "VisitOrganization")
    public String getVisitOrganization() {
        return visitOrganization;
    }

    public void setVisitOrganization(String visitOrganization) {
        this.visitOrganization = visitOrganization;
    }

    @XmlElement(name = "PharmacyId")
    public String getPharmacyId() {
        return pharmacyId;
    }

    public void setPharmacyId(String pharmacyId) {
        this.pharmacyId = pharmacyId;
    }

    @XmlElement(name = "DrugType")
    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    @XmlElement(name = "PrescriptionRecordId")
    public String getPrescriptionRecordId() {
        return prescriptionRecordId;
    }

    public void setPrescriptionRecordId(String prescriptionRecordId) {
        this.prescriptionRecordId = prescriptionRecordId;
    }

    @XmlElement(name = "PiecesChineseMedicineAgentNumb")
    public Integer getPiecesChineseMedicineAgentNumb() {
        return piecesChineseMedicineAgentNumb;
    }

    public void setPiecesChineseMedicineAgentNumb(Integer piecesChineseMedicineAgentNumb) {
        this.piecesChineseMedicineAgentNumb = piecesChineseMedicineAgentNumb;
    }

    @XmlElement(name = "BoilSign")
    public Integer getBoilSign() {
        return boilSign;
    }

    public void setBoilSign(Integer boilSign) {
        this.boilSign = boilSign;
    }

    @XmlElement(name = "OperationType")
    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    @XmlElement(name = "EpitaxialSign")
    public String getEpitaxialSign() {
        return epitaxialSign;
    }

    public void setEpitaxialSign(String epitaxialSign) {
        this.epitaxialSign = epitaxialSign;
    }

    @XmlElement(name = "RecipeNumber")
    public String getRecipeNumber() {
        return recipeNumber;
    }

    public void setRecipeNumber(String recipeNumber) {
        this.recipeNumber = recipeNumber;
    }

    @XmlElement(name = "InvoiceCode")
    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    @XmlElement(name = "PrescriptionDept")
    public String getPrescriptionDept() {
        return prescriptionDept;
    }

    public void setPrescriptionDept(String prescriptionDept) {
        this.prescriptionDept = prescriptionDept;
    }

    @XmlElement(name = "PrescriptionDoctor")
    public String getPrescriptionDoctor() {
        return prescriptionDoctor;
    }

    public void setPrescriptionDoctor(String prescriptionDoctor) {
        this.prescriptionDoctor = prescriptionDoctor;
    }

    @XmlElement(name = "PrescriptionDate")
    public String getPrescriptionDate() {
        return prescriptionDate;
    }

    public void setPrescriptionDate(String prescriptionDate) {
        this.prescriptionDate = prescriptionDate;
    }

    @XmlElementWrapper(name = "PrescriptionDrugs")
    @XmlElement(name = "PrescriptionDrug")
    public List<PrescriptionDrug> getPrescriptionDrugs() {
        return PrescriptionDrugs;
    }

    public void setPrescriptionDrugs(List<PrescriptionDrug> prescriptionDrugs) {
        PrescriptionDrugs = prescriptionDrugs;
    }

    public static class PrescriptionDrug {
        private String drugsNumber;
        private String onlinePrescriptionDetailId;
        private String drugProductionPlaceId;
        private String drugProductionPlace;
        private String onceDosage;
        private String dosageUnit;
        private String drugSendNumber;
        private Integer medicineDays;
        private String drugUsingRate;
        private String drugUsePathwaysCode;
        private String herbalMedicineDecoction;
        private String herbalFootNote;
        private Integer piecesChineseMedicineAgentNumb;
        private String drugsGroupNumber;
        private Integer sortNumber;
        private String remark;
        private int drugstorePacking;
        private String drugstoreUnit;
        private String drugUnitPrice;
        private String drugSpecifications;


        @XmlElement(name = "DrugstoreUnit")
        public String getDrugstoreUnit() {
            return drugstoreUnit;
        }

        public void setDrugstoreUnit(String drugstoreUnit) {
            this.drugstoreUnit = drugstoreUnit;
        }

        @XmlElement(name = "DrugstorePacking")
        public int getDrugstorePacking() {
            return drugstorePacking;
        }

        public void setDrugstorePacking(int drugstorePacking) {
            this.drugstorePacking = drugstorePacking;
        }

        @XmlElement(name = "DrugUnitPrice")
        public String getDrugUnitPrice() {
            return drugUnitPrice;
        }

        public void setDrugUnitPrice(String drugUnitPrice) {
            this.drugUnitPrice = drugUnitPrice;
        }

        @XmlElement(name = "DrugSpecifications")
        public String getDrugSpecifications() {
            return drugSpecifications;
        }

        public void setDrugSpecifications(String drugSpecifications) {
            this.drugSpecifications = drugSpecifications;
        }

        @XmlElement(name = "OnlinePrescriptionDetailId")
        public String getOnlinePrescriptionDetailId() {
            return onlinePrescriptionDetailId;
        }

        public void setOnlinePrescriptionDetailId(String onlinePrescriptionDetailId) {
            this.onlinePrescriptionDetailId = onlinePrescriptionDetailId;
        }

        @XmlElement(name = "DrugsNumber")
        public String getDrugsNumber() {
            return drugsNumber;
        }

        public void setDrugsNumber(String drugsNumber) {
            this.drugsNumber = drugsNumber;
        }

        @XmlElement(name = "DrugProductionPlaceId")
        public String getDrugProductionPlaceId() {
            return drugProductionPlaceId;
        }

        public void setDrugProductionPlaceId(String drugProductionPlaceId) {
            this.drugProductionPlaceId = drugProductionPlaceId;
        }

        @XmlElement(name = "DrugProductionPlace")
        public String getDrugProductionPlace() {
            return drugProductionPlace;
        }

        public void setDrugProductionPlace(String drugProductionPlace) {
            this.drugProductionPlace = drugProductionPlace;
        }

        @XmlElement(name = "OnceDosage")
        public String getOnceDosage() {
            return onceDosage;
        }

        public void setOnceDosage(String onceDosage) {
            this.onceDosage = onceDosage;
        }

        @XmlElement(name = "DosageUnit")
        public String getDosageUnit() {
            return dosageUnit;
        }

        public void setDosageUnit(String dosageUnit) {
            this.dosageUnit = dosageUnit;
        }

        @XmlElement(name = "DrugSendNumber")
        public String getDrugSendNumber() {
            return drugSendNumber;
        }

        public void setDrugSendNumber(String drugSendNumber) {
            this.drugSendNumber = drugSendNumber;
        }

        @XmlElement(name = "MedicineDays")
        public Integer getMedicineDays() {
            return medicineDays;
        }

        public void setMedicineDays(Integer medicineDays) {
            this.medicineDays = medicineDays;
        }

        @XmlElement(name = "DrugUsingRate")
        public String getDrugUsingRate() {
            return drugUsingRate;
        }

        public void setDrugUsingRate(String drugUsingRate) {
            this.drugUsingRate = drugUsingRate;
        }

        @XmlElement(name = "DrugUsePathwaysCode")
        public String getDrugUsePathwaysCode() {
            return drugUsePathwaysCode;
        }

        public void setDrugUsePathwaysCode(String drugUsePathwaysCode) {
            this.drugUsePathwaysCode = drugUsePathwaysCode;
        }

        @XmlElement(name = "HerbalMedicineDecoction")
        public String getHerbalMedicineDecoction() {
            return herbalMedicineDecoction;
        }

        public void setHerbalMedicineDecoction(String herbalMedicineDecoction) {
            this.herbalMedicineDecoction = herbalMedicineDecoction;
        }

        @XmlElement(name = "HerbalFootNote")
        public String getHerbalFootNote() {
            return herbalFootNote;
        }

        public void setHerbalFootNote(String herbalFootNote) {
            this.herbalFootNote = herbalFootNote;
        }

        @XmlElement(name = "PiecesChineseMedicineAgentNumb")
        public Integer getPiecesChineseMedicineAgentNumb() {
            return piecesChineseMedicineAgentNumb;
        }

        public void setPiecesChineseMedicineAgentNumb(Integer piecesChineseMedicineAgentNumb) {
            this.piecesChineseMedicineAgentNumb = piecesChineseMedicineAgentNumb;
        }

        @XmlElement(name = "DrugsGroupNumber")
        public String getDrugsGroupNumber() {
            return drugsGroupNumber;
        }

        public void setDrugsGroupNumber(String drugsGroupNumber) {
            this.drugsGroupNumber = drugsGroupNumber;
        }

        @XmlElement(name = "SortNumber")
        public Integer getSortNumber() {
            return sortNumber;
        }

        public void setSortNumber(Integer sortNumber) {
            this.sortNumber = sortNumber;
        }

        @XmlElement(name = "Remark")
        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof HisPrescriptionInformationRequest)) {
            return false;
        }

        HisPrescriptionInformationRequest that = (HisPrescriptionInformationRequest) o;

        if (visitOrganization != null ? !visitOrganization.equals(that.visitOrganization) : that.visitOrganization != null) {
            return false;
        }
        if (recipeOrganization != null ? !recipeOrganization.equals(that.recipeOrganization) : that.recipeOrganization != null) {
            return false;
        }
        if (roamOrganization != null ? !roamOrganization.equals(that.roamOrganization) : that.roamOrganization != null) {
            return false;
        }
        if (pharmacyId != null ? !pharmacyId.equals(that.pharmacyId) : that.pharmacyId != null) {
            return false;
        }
        if (drugType != null ? !drugType.equals(that.drugType) : that.drugType != null) {
            return false;
        }
        if (prescriptionRecordId != null ? !prescriptionRecordId.equals(that.prescriptionRecordId) : that.prescriptionRecordId != null) {
            return false;
        }
        if (onlinePrescriptionRecordId != null ? !onlinePrescriptionRecordId.equals(that.onlinePrescriptionRecordId) : that.onlinePrescriptionRecordId != null) {
            return false;
        }
        if (piecesChineseMedicineAgentNumb != null ? !piecesChineseMedicineAgentNumb.equals(that.piecesChineseMedicineAgentNumb) : that.piecesChineseMedicineAgentNumb != null) {
            return false;
        }
        if (boilSign != null ? !boilSign.equals(that.boilSign) : that.boilSign != null) {
            return false;
        }
        if (operationType != null ? !operationType.equals(that.operationType) : that.operationType != null) {
            return false;
        }
        if (epitaxialSign != null ? !epitaxialSign.equals(that.epitaxialSign) : that.epitaxialSign != null) {
            return false;
        }
        if (recipeNumber != null ? !recipeNumber.equals(that.recipeNumber) : that.recipeNumber != null) {
            return false;
        }
        if (invoiceCode != null ? !invoiceCode.equals(that.invoiceCode) : that.invoiceCode != null) {
            return false;
        }
        if (prescriptionDept != null ? !prescriptionDept.equals(that.prescriptionDept) : that.prescriptionDept != null) {
            return false;
        }
        if (prescriptionDoctor != null ? !prescriptionDoctor.equals(that.prescriptionDoctor) : that.prescriptionDoctor != null) {
            return false;
        }
        if (prescriptionDate != null ? !prescriptionDate.equals(that.prescriptionDate) : that.prescriptionDate != null) {
            return false;
        }
        return PrescriptionDrugs != null ? PrescriptionDrugs.equals(that.PrescriptionDrugs) : that.PrescriptionDrugs == null;
    }

    @Override
    public int hashCode() {
        int result = visitOrganization != null ? visitOrganization.hashCode() : 0;
        result = 31 * result + (recipeOrganization != null ? recipeOrganization.hashCode() : 0);
        result = 31 * result + (roamOrganization != null ? roamOrganization.hashCode() : 0);
        result = 31 * result + (pharmacyId != null ? pharmacyId.hashCode() : 0);
        result = 31 * result + (drugType != null ? drugType.hashCode() : 0);
        result = 31 * result + (prescriptionRecordId != null ? prescriptionRecordId.hashCode() : 0);
        result = 31 * result + (onlinePrescriptionRecordId != null ? onlinePrescriptionRecordId.hashCode() : 0);
        result = 31 * result + (piecesChineseMedicineAgentNumb != null ? piecesChineseMedicineAgentNumb.hashCode() : 0);
        result = 31 * result + (boilSign != null ? boilSign.hashCode() : 0);
        result = 31 * result + (operationType != null ? operationType.hashCode() : 0);
        result = 31 * result + (epitaxialSign != null ? epitaxialSign.hashCode() : 0);
        result = 31 * result + (recipeNumber != null ? recipeNumber.hashCode() : 0);
        result = 31 * result + (invoiceCode != null ? invoiceCode.hashCode() : 0);
        result = 31 * result + (prescriptionDept != null ? prescriptionDept.hashCode() : 0);
        result = 31 * result + (prescriptionDoctor != null ? prescriptionDoctor.hashCode() : 0);
        result = 31 * result + (prescriptionDate != null ? prescriptionDate.hashCode() : 0);
        result = 31 * result + (PrescriptionDrugs != null ? PrescriptionDrugs.hashCode() : 0);
        return result;
    }
}
